import javax.naming.Name;

/**
 * @version v1.0
 * @Description
 * @Author admin
 * @date 2021/7/12  13:59
 * @Copyright
 */
public class Student {
    private String name;
    private   int age;

    public Student(String name, int age) {
        this(name);//调用第一个参数的方法
        this.name =name;
        this.age =age;
    }

//this调用其他方法时，必须放在第一行,
    public Student(String name) {
    this();
        this.name =name;

    }

    public Student() {

    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }
}
